Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

vincenthz/hs-siphash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haskell Siphash

Simple module to compute the SipHash algorithm.

Install

cabal install siphash

Usage

siphash-2-4:

import Crypto.MAC.SipHash (hash)
import qualified Data.ByteString.Char8 as B

k0 = 0xaaaaaaaaaaaaaaaa
k1 = 0xbbbbbbbbbbbbbbbb
tag = hash (SipKey k0 k1) (B.pack "my text to hash")

siphash-c-d:

import Crypto.MAC.SipHash (hash)
import qualified Data.ByteString.Char8 as B

k0 = 0xaaaaaaaaaaaaaaaa
k1 = 0xbbbbbbbbbbbbbbbb
tag = hashWith nbCompressionRounds nbDigestRounds (SipKey k0 k1) (B.pack "my text to hash")

About

siphash algorithm in haskell

Resources

License

Stars

Watchers

Forks

Packages

No packages published